<template>
  <div>
    <h1>这是 {{comName}} 组件</h1>
  </div>
</template>

<script>
export default {
  data() {
    return {
      comName: 'Test'
    }
  },
  methods: {
    changeName(name) {
      this.comName = name
    }
  }
}
</script>

<style scoped>
h1 {
  color: red;
}
</style>